package cn.com.wangluotongxin.database.mysql.utils;

import cn.com.wangluotongxin.mysql.service.SqlConnection;

import java.util.HashMap;
import java.util.Map;

public class SourceMysqlConnectionUtil {

    private static final String MAP_KEY = "connection";

    private static Map<String, SqlConnection> connectionMap = new HashMap<>();

    public static void setConnection(SqlConnection connection) {
        connectionMap.put(MAP_KEY, connection);
    }


    public static SqlConnection getConnection() {
        return connectionMap.get(MAP_KEY);
    }

    public static void clear(){
        connectionMap.clear();
    }
}
